package com.yunbiao.ybbusstopplate.ui.dialog;

import android.app.Dialog;
import android.content.Context;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.TextView;
import com.yunbiao.ybbusstopplate.R;

public class LoadingDialog extends Dialog {
    private View view;
    private Context context;
    private TextView tv_dialog_msg;
    private String msg;

    public LoadingDialog(Context context) {
        super(context,R.style.dialog);
        initView(context);
    }

    public LoadingDialog(Context context, int themeResId) {
        super(context, themeResId);
        initView(context);
    }

    public void setMessage(String msg){
        this.msg=msg;
    }

    private void initView(Context context){
        this.context=context;
        view= LayoutInflater.from(this.context).inflate(R.layout.dialog_loading,null);
        tv_dialog_msg=findViewById(R.id.tv_dialog_msg);

        if (!TextUtils.isEmpty(msg)){
            tv_dialog_msg.setText(msg);
        }

        setContentView(view);

        initData();
    }

    private void initData(){

    }

}
